#ifndef COLORMAP_H
#define COLORMAP_H
#include <QVector>
#include <QColor>

/**
 * Class staticallly contains a number of colormaps and can return them in a number of formats.
 */
class Colormap{
public:
	Colormap();
	~Colormap();
	/// @returns the name of the colormap with given number
	static const char* getName(int i);
	/// @returns available number of colormaps
	static const int getNumber(){ return 13; }
	/**
	 * @returns colormap as 256 value unint array. Each color is described by its
	 * R value in the 8 least significant bits (0xFF),
	 * G value in the next 8 bits (0xFF00),
	 * B value in the next 8 bits (0xFF0000).
	 * The 8 most significant bits are not used.
	 */
	static const unsigned int *getUInt(int i);
	/// @returns colormap as QVector of QColor's
	QVector<QColor> getQVector(int i) const;
private:
	static const char *mapNames[];
	static const unsigned *mapsUInt[];
	QVector<QColor> *mapsQVector[13];

	static const unsigned gray[];
	static const unsigned jet[];
	static const unsigned hsv[];
	static const unsigned hot[];
	static const unsigned cool[];
	static const unsigned spring[];
	static const unsigned summer[];
	static const unsigned autumn[];
	static const unsigned winter[];
	static const unsigned bone[];
	static const unsigned copper[];
	static const unsigned pink[];
	static const unsigned flag[];
};
#endif // COLORMAP_H
